package org.bits.data;

/*******************************************************************************
 * 
 ******************************************************************************/
public class DataCondition
{
    /** The field to be checked. */
    private final Field<?> field;
    /** The type of test to be performed. */
    private final FieldTest test;
    /** The value against which the field will be tested. */
    private final String condition;

    /***************************************************************************
     * Constructor
     * @param field
     * @param test
     * @param condition
     **************************************************************************/
    public DataCondition( Field<?> field, FieldTest test, String condition )
    {
        this.field = field;
        this.test = test;
        this.condition = condition;
    }

    /***************************************************************************
     * Returns the {@link Field} associated with this condition.
     * @return
     **************************************************************************/
    public Field<?> getField()
    {
        return field;
    }

    /***************************************************************************
     * Returns the {@link FieldTest} associated with this condition.
     * @return
     **************************************************************************/
    public FieldTest getFieldTest()
    {
        return test;
    }

    /***************************************************************************
     * Returns the condition.
     * @return
     **************************************************************************/
    public String getCondition()
    {
        return condition;
    }
}
